<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>5_2_3-1-v-model基本用法</title>
</head>

<body>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <div id="Application">
    <div>
      <input v-model="inputText" />
      <div>{{inputText}}</div>
      <button @click="this.inputText = ''">清空</button>
    </div>
  </div>
  <script>
    const App = Vue.createApp({
      data() {
        return {
          inputText: "",
        };
      },
    });
    App.mount("#Application");
  </script>
</body>

</html>